This invention relates to installer program modules for installing a computer program module onto a computer. More particularly, this invention relates to a method and system for restoring a computer to its original state after an unsuccessful installation attempt of an application program module by an installer program module.
Sometimes, errors may occur when an installer program module is installing an application program module onto a computer. For example, a user may attempt to download an upgrade to an application program module while connected to the Internet via a modem. The modem connection may become disconnected at some point after the download has begun. The user may attempt to reconnect to his Internet service provider and restart the download. However, without reconnecting to the Internet and restarting the download, then the user""s computer may be left in a state such that the application program module that the user was attempting to upgrade is unusable. Thus, the user may wish to return his computer to its state prior to the download attempt. However, this is not an option using prior installer program modules. Typically, prior installer program modules delete files and save updated files such that it is impossible to return the computer to its previous state.
At times, an installation does not fail, but instead is aborted by the user. For example, a user may terminate an installation before it is complete, such as by selecting a Cancel button. The user may wish to return his computer to the state it was in prior to the aborted installation. Thus, there is a need for a method and system for returning a computer to the state it was in prior to a failed or aborted installation.
After a failed or aborted installation attempt, the user may want to begin the installation again at the point that the installation failed or was aborted. Using prior installer program modules, an installation starts from the beginning and must be completed entirely in one installation. In other words, even if most of the installation process has been completed in a prior failed installation attempt, the entire installation must be performed in a second installation attempt. Thus, there is a need for an installer program module that allows a user to begin installation at the point of failure of a prior failed installation so that dialogs requesting information already entered in a prior installation attempt may be bypassed.
Sometimes, installations of application program modules are performed by administrators deploying the application program module over a network. These administrators are not able to return the machines on the network to their previous state should an installation fail. Thus, there is a need for an installer program module that allows a network administrator to deploy an application program module to machines on a network while allowing for the return of the machines to a previous state should an installation failure or abortion occur.
Thus, there is a need for a method and system for installing an application program module that returns a computer to the state it was in prior to a failed or aborted installation. There is a further need for a method and system for installing an application program module that allows a user to begin installation at the point of failure of a prior failed installation. There is still a further need for a method and system for installing an application program module that allows a network administrator to install the application program module to machines on a network while allowing for the return of the machines to a previous state should an installation failure or abortion occur.
The present invention satisfies the above described needs by providing a method and system for xe2x80x9crolling backxe2x80x9d a computer, i.e., restoring a computer to its original state after a failed or aborted installation attempt of an application program module. In one aspect, a rollback script may be used to reverse an action of an installer program module so that a user""s machine is restored to its original state, i.e., the state before the installer program module began performing operations.
In performing operations, the installer program module typically generates installation script records of specific actions that are to be performed to a particular machine with regard to installation data. During the processing of each installation script record, an inverse record is created, known as a rollback script record. When installing a file, if there is no file with the same name in the same location stored on the machine, then a rollback script record describing how to delete the file is stored. However, if an old file stored in the same location does exist, then the old file is backed up to another location and a rollback script record is saved describing how to copy the old file back to its prior location on the machine.
In another aspect, the present invention is a user interface displayed to the user when xe2x80x9crolling backxe2x80x9d an installation operation. The user interface may include a rollback bar with a number of level indicators. The level indicators appear in the rollback bar and are typically rectangles that are removed as the rollback operation is completed. When the rollback operation is completed, there are typically no level indicators displayed in the rollback bar.
In still another aspect, the present invention is a method for determining whether to enable xe2x80x9crollbackxe2x80x9d. The cost of installing an application program module and the cost of storing corresponding rollback script records and corresponding backed-up rollback files is determined. It is determined whether the cost of installing the application program module and the cost of storing the rollback script records and backed-up rollback files is greater than the available disk space of the computer. If so, then the application program module is installed while storing the rollback script records and backed-up rollback files. In other words, xe2x80x9crollbackxe2x80x9d is enabled.
These and other features, advantages, and aspects of the present invention may be more clearly understood and appreciated from a review of the following detailed description of the disclosed embodiments and by reference to the appended drawings and claims.